<form nz-form>
  <nz-form-item>
    <nz-form-control nzHasFeedback [nzErrorTip]="combineTpl">
      <input
        nz-input
        [(ngModel)]="value"
        name="input"
        [maxlength]="maxlength"
        [minlength]="minlength"
        [required]="minlength > 0"
      />
    </nz-form-control>

    <ng-template #combineTpl let-control>
      <ng-container *ngIf="control.hasError('maxlength')">输入最大长度不超过{{ maxlength }}</ng-container>
      <ng-container *ngIf="control.hasError('minlength')">输入最小长度不低于{{ minlength }}</ng-container>
      <ng-container *ngIf="control.hasError('required')">必须输入</ng-container>
    </ng-template>
  </nz-form-item>
</form>
<div *nzModalFooter>
  <button nz-button style="margin-right: 8px" (click)="cancel()">取消</button>
  <button nz-button nzType="primary" (click)="sure()">确认</button>
</div>
